using System;
using Microsoft.Win32;

namespace ChrisTec.WindowsMobile.TodayScreen
{
  public static class TodayScreen
  {
    public static IntPtr NativeHandle
    {
      get
      {
        // Determine the window handle for the native part of
        // our today screen item
        // [CF] - TODO - handle the exception here if this key can't be read...
        RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Today\Items\Managed Items");
        object val = key.GetValue("NativeHandle");
        key.Close();

        return (IntPtr)(int)val;
      }
    }

  }
}
